package io.github.openUtil.core;

/**
 * @author openUtil
 */

public enum MediaType {
    /* 默认二进制流 */
    BINARY("application/octet-stream"),

    MP3("audio/mp3"),

    MP4("video/mp4"),

    PNG("image/png"),

    JPEG("image/jpeg"),

    JPG("image/jpg"),

    PPT("applications-powerpoint"),

    PDF("application/pdf"),

    TXT_XML("text/xml");

    private String contentType;

    MediaType(String name) {
        this.contentType = name;
    }

    public String getContentType() {
        return contentType;
    }

    public  boolean instanceOf(String type) {
        return contentType.contains(type);
    }

}
